package cafe.adriel.androidaudiorecorder.model;

import ohos.media.audio.AudioStreamInfo;

/**
 * ex.
 * AudioChannel 枚举类型
 *
 * @author lj
 * @since 2021-05-12
 */
public enum AudioChannel {
    /**
     * 音频渠道 枚举 STEREO
     */
    STEREO,
    /**
     * 音频渠道 MONO
     */
    MONO;
    /**
     * 获取资源
     *
     * @return 获取getChannel
     */
    public int getChannel() {
        switch (this) {
            case MONO:
                return AudioStreamInfo.ChannelMask.CHANNEL_IN_MONO.getValue();
            default:
                return AudioStreamInfo.ChannelMask.CHANNEL_IN_STEREO.getValue();
        }
    }
}